Skip to content

More integration tests #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 29, 2020
Merged

More integration tests #173

merged 8 commits into from
Dec 29, 2020

Conversation

kiran-chaudhary
Copy link
Contributor

Added trivial integration test cases, those that do not need any pre-test setup or cleanup.

@github-actions
Copy link

github-actions bot commented Dec 9, 2020

CLA Assistant Lite bot All contributors have signed the CLA ✍️

(f"{DEPARTING_EMPLOYEE_COMMAND} bulk remove", "Missing argument 'FILE'."),
],
)
def test_departing_employee_command_returns_error_exit_status_when_missing_required_parameters(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These negative tests should fall under unit tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree. Should we move them to their respective unit test modules? There might some tests of this similar nature dispersed already, but I know there is not a ton

@pytest.mark.parametrize(
"command",
[
f"{ALERT_RULES_COMMAND} list",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string.format is more consistent with how we format strings in py42

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed.

@antazoey
Copy link
Contributor

These look good! I have the same thought as you - that the negatives tests are more like integration tests when they verify args are present. I think they are good tests to have. Just recently, we had a big where deleting profile name arg was no required, these tests would have caught that earlier.

Copy link
Contributor

@antazoey antazoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good for now, but some of the same improvements for py42 integration tests apply here (make able to run via pytest)

@kiran-chaudhary
Copy link
Contributor Author

looks good for now, but some of the same improvements for py42 integration tests apply here (make able to run via pytest)

Changed.

Copy link
Contributor

@timabrmsn timabrmsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Were you still going to remove/move those negative tests that should be covered by unit tests?

@kiran-chaudhary
Copy link
Contributor Author

LGTM. Were you still going to remove/move those negative tests that should be covered by unit tests?

We will keep those tests and I have added the integration marker to all positive cases here. So they both will stay. Now I plan to move all of them to tests directory after merging them.

@kiran-chaudhary kiran-chaudhary merged commit 1be5908 into master Dec 29, 2020
@kiran-chaudhary kiran-chaudhary deleted the more-integration-tests branch December 29, 2020 04:25
@github-actions github-actions bot locked and limited conversation to collaborators Dec 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants